﻿/***
 * В данном файле описаны функции Clone для стандартных классов DiagramBox
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Diagrams
{
    public partial class RectFigure : SolidFigure
    {
        public override object Clone()
        {
            RectFigure figure = new RectFigure();
            figure.serializablePath = serializablePath;
            figure.Name = Name;
            figure.AutoSizeEnable = AutoSizeEnable;
            figure.location = location;
            figure.ownerFigure = ownerFigure;
            figure.resizeDirections = resizeDirections;
            figure.text = text;
            figure.TextChangeEnable = TextChangeEnable;
            figure.textFont = textFont;
            (figure as SolidFigure).textRect = (this as SolidFigure).textRect;
            return figure as Object;
        }
    }
    public partial class LabelFigure : SolidFigure
    {
    }
    public partial class RoundRectFigure : SolidFigure
    {
        /*public override object Clone()
        {
            return this.MemberwiseClone();
        }*/
    }
    public partial class RhombFigure : SolidFigure
    {
    }
    public partial class ParalelogrammFigure : SolidFigure
    {
    }
    public partial class EllipseFigure : SolidFigure
    {
    }
    public partial class LineFigure : Figure
    {
    }
    public partial class LedgeLineFigure : LineFigure
    {
    }
    public partial class BottomRightMarker : Marker
    {
    }
    public partial class BottomLeftMarker : Marker
    {
        public override object Clone()
        {
            BottomLeftMarker figure = new BottomLeftMarker();
            figure.targetFigure = targetFigure;
            //копируем свойства фигуры

            return figure as Object;
        }
    }
    public partial class TopRightMarker : Marker
    {
        public override object Clone()
        {
            TopRightMarker figure = new TopRightMarker();
            figure.targetFigure = targetFigure;
            //копируем свойства фигуры

            return figure as Object;
        }
    }
    public partial class TopLeftMarker : Marker
    {
        public override object Clone()
        {
            TopLeftMarker figure = new TopLeftMarker();
            figure.targetFigure = targetFigure;
            //копируем свойства фигуры

            return figure as Object;
        }
    }
    public partial class RightWidthMarker : WidthMarker
    {
        public override object Clone()
        {
            RightWidthMarker figure = new RightWidthMarker();
            figure.targetFigure = targetFigure;
            //копируем свойства фигуры

            return figure as Object;
        }
    }
    public partial class LeftWidthMarker : WidthMarker
    {
        public override object Clone()
        {
            LeftWidthMarker figure = new LeftWidthMarker();
            figure.targetFigure = targetFigure;
            //копируем свойства фигуры

            return figure as Object;
        }
    }
    public partial class TopHeightMarker : HeightMarker
    {
        public override object Clone()
        {
            TopHeightMarker figure = new TopHeightMarker();
            figure.targetFigure = targetFigure;
            //копируем свойства фигуры

            return figure as Object;
        }
    }
    public partial class BottomHeightMarker : HeightMarker
    {
        public override object Clone()
        {
            BottomHeightMarker figure = new BottomHeightMarker();
            figure.targetFigure = targetFigure;
            //копируем свойства фигуры

            return figure as Object;
        }
    }
    public partial class EndLineMarker : Marker, IConnectable
    {
        public override object Clone()
        {
            EndLineMarker figure = new EndLineMarker(diagram, pointIndex);
            figure.targetFigure = targetFigure;
            //копируем свойства фигуры

            return figure as Object;
        }
    }
    public partial class LedgeMarker : Marker
    {
        public override object Clone()
        {
            LedgeMarker figure = new LedgeMarker(ledgePointIndex);
            figure.targetFigure = targetFigure;
            //копируем свойства фигуры

            return figure as Object;
        }
    }
}
